package com.abel.demo.event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Author: Abel.lin
 * Date: 2020/9/17 14:14
 * Company: Abel.Studio
 * Copyright: Copyright (c) 2017
 * Description:
 */
@Component
public class DemoListener {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Async
    @EventListener
    public void listener(DemoEvent event){
        logger.info("trigger demo event: {}, {}", event.getParam1(), event.getParam2());

    }
}
